from users import user_bp
from flask import request, session


@user_bp.route('/set_session')
def set_session():
    '''设置session'''
    session['username'] = 'itcast'
    return 'session OK'


@user_bp.route('/get_session')
def get_session():
    '''获取session'''
    username = session.get('username')

    return 'username:%s' % username
